package study.springcloud.client.feign.controller;

import cn.hutool.core.thread.ThreadUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import study.eggs.result.Result;
import study.eggs.result.Results;

@Slf4j
@RestController
public class SleepController {

    @RequestMapping("/sleep/{time}")
    public Result echo(@PathVariable long time) {
        log.info(">>>>>>>>>> echo echo echo");
        ThreadUtil.sleep(time);
        return Results.ok();
    }
}
